﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace Pixysoft.Framework.Logs
{
    public interface IRecord : IComparable<IRecord>
    {
        /// <summary>
        /// 节点名称
        /// </summary>
        string ElementName { get; }

        /// <summary>
        /// 节点内容
        /// </summary>
        string Text { get;set;}

        /// <summary>
        /// 内部生成 节点唯一标识
        /// </summary>
        string Id { get;}

        /// <summary>
        /// 内部生成 节点时间戳
        /// </summary>
        string RawDate { get;}

        /// <summary>
        /// 内部生成节点唯一时间戳
        /// </summary>
        DateTime Date { get;}

        /// <summary>
        /// 节点属性
        /// </summary>
        IRecordPropertyCollection Properties { get;}

        /// <summary>
        /// 节点的子节点
        /// </summary>
        IRecordCollection Records { get;}

        /// <summary>
        /// 结构化序列化
        /// </summary>
        /// <returns></returns>
        string Serialize();

        /// <summary>
        /// 结构化序列化
        /// </summary>
        /// <returns></returns>
        string Serialize(bool indent);
    }
}
